"""
2.文件写入方法


"""
import os
os.chdir(r"D:\PycharmProjects\national_computer_rank_examination\文件和数据维度")

f = open("test_writelines.txt", 'w',encoding="utf-8")
list = ["床前明月光\n","疑是地上霜\n","举头望明月\n","低头思故乡\n"]

f.writelines(list)
f.close()